package org.jazz.board;

import java.util.Date;

public class BoardVO { 
	private Integer bbsno;
	private String title;
	private String content;
	private Date regdate;
	private Integer gno;
	private Integer gord;
	private Integer pno;
	private Date modifydate;
	private Integer readcnt;
	private Integer depth;
	private String userid;
	private Integer totalcnt;
	private Integer replycnt=0;
	public BoardVO() {
		super();
	}
	
	public BoardVO(Integer bbsno, String title, String content, Date regdate,
			Integer gno, Integer gord, Integer pno, Date modifydate,
			Integer readcnt, Integer depth, String userid, Integer totalcnt){
		super();
		this.bbsno = bbsno;
		this.title = title;
		this.content = content;
		this.regdate = regdate;
		this.gno = gno;
		this.gord = gord;
		this.pno = pno;
		this.modifydate = modifydate;
		this.readcnt = readcnt;
		this.depth = depth;
		this.userid = userid;
		this.totalcnt = totalcnt;
	}

	public Integer getBbsno() {
		return bbsno;
	}
	public void setBbsno(Integer bbsno) {
		this.bbsno = bbsno;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getRegdate() {
		return regdate;
	}
	public void setRegdate(Date regdate) {
		this.regdate = regdate;
	}
	public Integer getGno() {
		return gno;
	}
	public void setGno(Integer gno) {
		this.gno = gno;
	}
	public Integer getGord() {
		return gord;
	}
	public void setGord(Integer gord) {
		this.gord = gord;
	}
	public Integer getPno() {
		return pno;
	}
	public void setPno(Integer pno) {
		this.pno = pno;
	}
	public Date getModifydate() {
		return modifydate;
	}
	public void setModifydate(Date modifydate) {
		this.modifydate = modifydate;
	}
	public Integer getReadcnt() {
		return readcnt;
	}
	public void setReadcnt(Integer readcnt) {
		this.readcnt = readcnt;
	}
	public Integer getDepth() {
		return depth;
	}
	public void setDepth(Integer depth) {
		this.depth = depth;
	}
	public String getUserid() {
		return userid;
	}
	public void setUserid(String userid) {
		this.userid = userid;
	}
	public Integer getTotalcnt() {
		return totalcnt;
	}
	public void setTotalcnt(Integer totalcnt) {
		this.totalcnt = totalcnt;
	}
	
	public Integer getReplycnt() {
		return replycnt;
	}

	public void setReplycnt(Integer replycnt) {
		this.replycnt = replycnt;
	}

	
	@Override
	public String toString() {
		return "BoardVO [bbsno=" + bbsno + ", title=" + title + ", content="
				+ content + ", regdate=" + regdate + ", gno=" + gno + ", gord="
				+ gord + ", pno=" + pno + ", modifydate=" + modifydate
				+ ", readcnt=" + readcnt + ", depth=" + depth + ", userid="
				+ userid + ", totalcnt=" + totalcnt + ", replycnt=" + replycnt
				+ "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((bbsno == null) ? 0 : bbsno.hashCode());
		result = prime * result + ((content == null) ? 0 : content.hashCode());
		result = prime * result + ((title == null) ? 0 : title.hashCode());
		result = prime * result + ((userid == null) ? 0 : userid.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BoardVO other = (BoardVO) obj;
		if (bbsno == null) {
			if (other.bbsno != null)
				return false;
		} else if (!bbsno.equals(other.bbsno))
			return false;
		if (content == null) {
			if (other.content != null)
				return false;
		} else if (!content.equals(other.content))
			return false;
		if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
		if (userid == null) {
			if (other.userid != null)
				return false;
		} else if (!userid.equals(other.userid))
			return false;
		return true;
	}

	
}